package com.lingkang.sales.data.dto;

import java.io.Serializable;
import lombok.Data;

/**
 * @author linke
 * @date 2020-02-15 上午 10:59
 * @description result 返回风格
 */
@Data
public class ResponsePageResult<T> implements Serializable {

  private static final long serialVersionUID = 123L;
  /**
   * 0-成功  -1-出现异常  1-失败  5-token无效
   */
  private Integer code;
  private String message;
  private Integer page;
  private Integer size;
  private Long total;
  private T data;

  public ResponsePageResult() {
    super();
  }

  public ResponsePageResult(Integer code) {
    super();
    this.code = code;
  }

  public ResponsePageResult(Integer code, String message) {
    super();
    this.code = code;
    this.message = message;
  }

  public ResponsePageResult(Integer code, T data) {
    super();
    this.code = code;
    this.data = data;
  }

  public ResponsePageResult(Integer code, String message, T data) {
    super();
    this.code = code;
    this.message = message;
    this.data = data;
  }

  public ResponsePageResult(Integer code, Integer page, Integer size, Long total, T data) {
    super();
    this.code = code;
    this.page = page;
    this.size = size;
    this.total = total;
    this.data = data;
  }

  public ResponsePageResult(Integer code, String message, Integer page, Integer size, Long total,
      T data) {
    super();
    this.code = code;
    this.message = message;
    this.page = page;
    this.size = size;
    this.total = total;
    this.data = data;
  }
}
